<template>
	<view>
		<view class="my-search-container" :style="{'backgroundColor':bgcolor}">
			<view class="my-search-box" :style="{'border-radius':radius + 'px'}" @click="gotosearch">
				<uni-icons type="search" ></uni-icons>
				<text class="placeholder">搜索</text>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			// 背景颜色
			bgcolor:{
				type:String,
				default:'#ADD8E6'
			},
			// 圆角尺寸
			radius:{
				type:Number,
				default:18
			}
			
		},
		data() {
			return {
				
			};
		},
		methods:{
			gotosearch(){
				uni.navigateTo({
					url:'/subpkg/search/search'
				})
			}
		}
	}
</script>

<style lang="scss">
.my-search-container{
	height: 50px;
	// background-color: #ADD8E6;
	display: flex;
	align-items: center;
	padding: 0 10px;
	.my-search-box{
		height: 36px;
		background-color: #fff;
		// border-radius: 18px;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		
		.placeholder{
			font-size: 15px;
			padding-left: 5px;
		}
	}
}
</style>